package test;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import expression.InfixtoPostfixTranslator;

public class MattPetroIPTest {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void firstConvertTest() {
		assertEquals(InfixtoPostfixTranslator.eval("8 + 25 + 8 * 3 / 2"), "8 25 + 8 3 * 2 / +");
	}
	
	@Test
	public void secondConvertTest() {
		assertEquals(InfixtoPostfixTranslator.eval("9 ^ 2 + 2 * ( 3 * 2 )"), "9 2 ^ 2 3 2 * * +");
	}
	
	@Test
	public void thirdConvertTest() {
		assertEquals(InfixtoPostfixTranslator.eval("5 * ( 10 / 2 ) + 6 * 3 + 2"), "5 10 2 / * 6 3 * + 2 +");
	}
	@Test
	public void fourthConvertTest() {
		assertEquals(InfixtoPostfixTranslator.eval("5 * 6 * 4 * 2 + ( 3 * 4 ) * 2"), "5 6 * 4 * 2 * 3 4 * 2 * +");
	}
	
	@Test
	public void fifthConvertTest() {
		assertEquals(InfixtoPostfixTranslator.eval("6 * 8 * ( 4 + 2 ) - 8 * 6"), "6 8 * 4 2 + * 8 6 * -");
	}

}
